package standino.velocity.db.db2;

import java.util.StringTokenizer;

public class DB2Object {
	private String name;

	private String schema;

	private String type;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getSchema() {
		return schema;
	}

	public void setSchema(String schema) {
		this.schema = schema;
	}

	public void setFullName(String full) {
		StringTokenizer st = new StringTokenizer(full, ".");
		if (st.hasMoreTokens()) {
			this.setSchema(st.nextToken());
		}
		if (st.hasMoreTokens()) {
			this.setName(st.nextToken());
		}

	}

	public String getFullName(){
		return this.schema+"."+this.name;
	}

}
